﻿@{
    ViewBag.Title = "startManufacture";
}

<script>
	function start(){
		oderid=document.getElementById("orderid");
		productName=document.getElementById("productName");
		personName=document.getElementById("personName");
		quantity=document.getElementById("quantity");
		if(orderid.value==""){
			alert("You must give the order ID");
			return;
		}
		if(productName.value==""){
			alert("You must give the name of the product");
			return;
		}
		if(personName.value==""){
			alert("You must give the name of the person");
			return;
		}
		if(productName.value.search(/\d/i)!=-1){
			alert("Do not give number to the  name of the product");
			productName.value="";
			return;
		}
		if(personName.value.search(/\d/i)!=-1){
			alert("Do not give number to the  name of the person");
			personName.value="";
			return;
		}
		productName.value="";
		personName.value="";
		document.getElementById("quantity").value="";
		orderid.value="";
		alert("OK");
	}
	function inspect(){
	//////

	}
</script>
<h2>Start the manufacture</h2>
<form>
    The ID of the order <input type="text" id="orderid" autocomplete="off" /> <br>
    The name of the product: <input type="text" id="productName" autocomplete="off" /> <br>
    The name of the person who orders: <input type="text" id="personName" autocomplete="off" /> <br>
    Quantity <input type="number" id="quantity" min="1" autocomplete="off" /> <br>
    <input type="button" value="start" onclick="start()" /> <br>
    <input type="button" value="inspect" onclick="inspect()" /> <br>

</form>
